lib/remote: Box OstreeRemote if experimental-api
authorColin Walters <walters@verbum.org>
Mon, 15 May 2017 13:10:54 +0000 (09:10 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Tue, 16 May 2017 08:28:47 +0000 (08:28 +0000)
To avoid an introspection warning.  Otherwise, don't box it.

Closes: #858
Approved by: pwithnall

src/libostree/ostree-remote.c
src/libostree/ostree-remote.h

index d6298fba397c58ee79316d40dace87e21c5eeeb0..86fae8d8ae59c3c19009fb9242a50d03fedff30c 100644 (file)
@@ -142,3 +142,9 @@ ostree_remote_unref (OstreeRemote *remote)
       g_slice_free (OstreeRemote, remote);
     }
 }
+
+#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
+G_DEFINE_BOXED_TYPE(OstreeRemote, ostree_remote,
+                    ostree_remote_ref,
+                    ostree_remote_unref);
+#endif
index bf62fd874a220e2bdc0468abc68194100c4171fa..8e96213cdbe468d65967969eb7f5e19d14ca7909 100644 (file)
@@ -48,9 +48,16 @@ G_BEGIN_DECLS
 typedef struct OstreeRemote OstreeRemote;
 #endif
 
+#ifdef OSTREE_ENABLE_EXPERIMENTAL_API
+_OSTREE_PUBLIC
+GType ostree_remote_get_type (void) G_GNUC_CONST;
+#else
+#ifndef __GI_SCANNER__
 _OSTREE_PUBLIC
 OstreeRemote *ostree_remote_ref (OstreeRemote *remote);
 _OSTREE_PUBLIC
 void ostree_remote_unref (OstreeRemote *remote);
+#endif /* GI_SCANNER */
+#endif
 
 G_END_DECLS